{% extends 'web_templates/public/base.html' %}
{% block title %}{{ g.col_first.column_name }} - {{ g.sys.web_name }} - {{ g.sys.web_all_key }}{% endblock %}
{% block keywords %}{% if g.col_first.column_keyword %}{{ g.col_first.column_keyword }} {% else %}{{ g.sys.web_key }}
{% endif %}{% endblock %}
{% block description %}{% if g.col_first.column_description %}{{ g.col_first.column_description }} {% else %}
    {{ g.sys.web_description }}{% endif %}{% endblock %}
{% block content_left %}
    <div class="positionbar">
        <ul class="bread clearfix">
            <li class="ico"><img src="{{ url_for('static',filename='tl_cms/images/ico_07.png') }}"></li>
            <li><a href="{{ url_for('web_bp.tl_index') }}">首页</a></li>
            <li class="last">
                <a href="{{ url_for('web_bp.list_article',uuid=g.col_first.uuid) }}"
                   title="{{ g.col_first.column_name }}">{{ g.col_first.column_name }}</a></li>
        </ul>
    </div>
    <!--articleList -->
    <ul class="articleCon">
        {% for doc in g.col_doc %}
            <li class="clearfix">
                {% if doc.thumb_img %}
                    <div class="thumb">
                        <a href="{{ url_for('web_bp.article_article',uuid=doc.uuid) }}" target="_blank">
                            <img src="{{ doc.thumb_img }}" title="{{ doc.title }}" width="200" height="131"> </a>
                    </div>
                {% endif %}
                <div class="mark {% if not doc.thumb_img %} no_img {% endif %}">
                    <h3><a href="{{ url_for('web_bp.article_article',uuid=doc.uuid) }}"
                           target="_blank" title="{{ doc.title }}">{{ doc.title[:22] }}</a></h3>
                    <p class="icogroup">
                    <span class="ico-list">
                        <span class="icon icon-01"></span>作者：
                        <a title="{{ doc.author }}">{{ doc.author }}</a></span><span class="ico-list">
                    <span class="icon icon-02"></span>日期：{{ doc.update_time }}</span>
                        <span class="ico-list"><span class="icon icon-03"></span>分类：
                        <a href="{{ url_for('web_bp.list_article',uuid=doc.pro.uuid) }}">{{ doc.pro.column_name }}</a></span>
                    </p>
                    <p class="info">
                        {% if doc.description %}
                            {{ doc.description[:100]|striptags }}{% if (doc.description|length)>100 %}...{% endif %}
                        {% else %}
                            {{ (doc.content|striptags)[:100] }}{% if (doc.content|striptags)|length>100 %}...{% endif %}
                        {% endif %}
                    </p>
                </div>
                <a href="{{ url_for('web_bp.article_article',uuid=doc.uuid) }}" class="more" target="_blank">阅读全文</a>
            </li>
        {% endfor %}
        <!-- 11个 -->
    </ul>
    {% if g.page.pages>1 %}
        <div class="bk15"></div>
        <div class="pagination">   <!--分页-->
            {% if g.page.has_prev %}
                <a href="{{ url_for('web_bp.list_article',uuid=g.col_first.uuid) }}?page={{ g.page.prev_num }}">上一页</a>
            {% endif %}
            {% for page in g.page.iter_pages(2,2,2,2) %}
                {% if g.page.page==page %}
                    <span>{{ page }}</span>
                {% elif page %}
                    <a href="{{ url_for('web_bp.list_article',uuid=g.col_first.uuid) }}?page={{ page }}">{{ page }}</a>
                {% endif %}
            {% endfor %}
            {% if not g.page.pages==g.page.page %}
                <a href="{{ url_for('web_bp.list_article',uuid=g.col_first.uuid) }}?page={{ g.page.pages }}" title="尾页">尾页</a>
            {% endif %}
            {% if g.page.has_next %}
                <a href="{{ url_for('web_bp.list_article',uuid=g.col_first.uuid) }}?page={{ g.page.next_num }}"
                   title="下一页">下一页</a>
            {% endif %}
        </div>
    {% endif %}
{% endblock %}